package ntest;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import com.example.hello_world.R;

public class test1_7 extends AppCompatActivity implements View.OnClickListener{

    private EditText editText;
    private Button button;
    private TextView textView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_test1_7);
        editText=findViewById(R.id.id_17edText);
        button=findViewById(R.id.id_17button);
        textView=findViewById(R.id.id_17text);

        button.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.id_17button:
                String string = editText.getText().toString().trim();
                textView.setText(string);
                break;
        }
    }
}